package com.yonyou.brigade.rtpnr.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.yonyou.brigade.rtpnr.model.RtpnrUser;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jiangzhf@yonyou.com
 * @since 2018-06-12
 */
public interface RtpnrUserMapper extends BaseMapper<RtpnrUser> {

    /**
     * 获取该租户下未同步的用户
     * @param params
     * @return
     */
    List<RtpnrUser> getNoSyncUsers(Map params);

    /**
     * 获取需要同步的用户
     * @param params
     * @return
     */
    List<RtpnrUser> getNeedUpdateUsers(Map params);

    /**
     * 根据用户id从bri_user表中获取一个rtpnruser类型的用户
     * @param userid
     * @return
     */
    RtpnrUser getRtpnrSingleUserByUseridFromBri(String userid);

    /**
     * 根据用户手机号和租户获取用户信息
     * @param params
     * @return
     */
    RtpnrUser getRtpnrSingleUserByPhoneAndTenantFromBri(Map params);


}
